package com.gsit.tuneup.domain;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import org.springframework.data.jpa.domain.AbstractPersistable;

@Entity
public class Answer extends AbstractPersistable<Long>{
	
	@Column
	private String name;
	
	@Column
	private Date date;
	
	@Column
	private String currency;
	
	@Column
	private Double amount;
	
	
	@OneToOne(cascade = {CascadeType.PERSIST})  
	@JoinColumn(name = "recordid", nullable = false) 
	private Record record;


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public Date getDate() {
		return date;
	}


	public void setDate(Date date) {
		this.date = date;
	}


	public String getCurrency() {
		return currency;
	}


	public void setCurrency(String currency) {
		this.currency = currency;
	}


	public Double getAmount() {
		return amount;
	}


	public void setAmount(Double amount) {
		this.amount = amount;
	}


	public Record getRecord() {
		return record;
	}


	public void setRecord(Record record) {
		this.record = record;
	}

}
